<?php

namespace App\Models\Base;

use Illuminate\Database\Eloquent\Model;

class EmailItem extends Model
{
    protected $fillable = ['log_email_id', 'item_id', 'created_at', 'num', 'flag'];

    public function email()
    {
        return $this->belongsTo(LogEmail::class, 'log_email_id');
    }

    public function getItems()
    {
        return $this->hasOne(Item::class, 'item_no', 'item_id');
    }
}
